Repository navigation
fix(ci): select latest test-result artifacts by creation time - #11329
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The changes require final human review because they are too complex or risky for automated approval.
Review effort: Lite
Findings: None
What changed in this PR
Updates test-result artifact selection to choose the newest artifact by creation time per partition, preserving successful reruns and untouched partitions.
Changes:
- Replaces generic artifact downloading with validated PowerShell selection and direct immutable-ID downloads.
- Adds provenance, digest, pagination, expiry, archive, and missing-result validation.
- Adds cross-platform regression tests for selection and reporting.
| File | Description |
|---|---|
| .github/workflows/test-test-results.yml | Updated as part of this pull request. |
| .github/workflows/test-results.yml | Updated as part of this pull request. |
| .github/scripts/test-test-results.ps1 | Updated as part of this pull request. |
| .github/scripts/download-test-results.ps1 | Updated as part of this pull request. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage
Report-only conclusion: current-main baseline stale. The newest successful coverage run tested 986e5c7, not current main dcf2925. Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
Fixes #11328.
The pinned artifact downloader chooses one artifact per name by descending artifact ID. In CI run 35388538285, the successful Windows Functional net10 rerun uploaded artifact
10566159940at 20:38:46 UTC, while the earlier failing upload had the larger ID10566260879at 20:14:10 UTC. The reporting workflow consequently retained the earlier failures. Explicit artifact IDs pass through the same latest-by-ID filter.Download test results through a trusted PowerShell helper which reads every REST artifact page, selects the newest
created_atfor each exact partition name, and downloads that immutable ID directly. Per-partition selection preserves successful shards from earlier attempts. Ambiguous timestamps, expired or unavailable selected artifacts, incomplete listings, and missing result files fail explicitly. The helper checks source run/commit/attempt identity, verifies available SHA-256 digests, and keeps each archive in its own fresh directory.Add focused regression fixtures and a read-only Windows/Linux workflow for selection and dry-run reporting. A read-only replay of the affected run selects all 54 current partitions and produces 48,178 passed, 0 failed, and 280 skipped; Windows Functional net10 reports 537 passed and 0 failed.
Coverage collection, required matrix, input fingerprints, publishing permissions, and provider branches remain unchanged. Deployment follows the existing trusted default-branch reporter model after human-reviewed landing.
Microsoft Reviewers: Open in CodeFlow